Edit Note
What does it do?
Replaces the text of a note in the current chat. The original author stays as it is; the bot is saved as the note's last editor. The updated note is stored under this node's name.
The bot can edit any note of the chat, including notes written by agents.
1. Syntax
<node_name>:
type: func
func_type: chat
func_id: editNote
params:
noteId: "<note_id>"
text: "<new_text>"
customName: "<editor_name>"
on_complete: <next_node>
on_failure: <failure_node>
required params
typetype of the nodefunc_typehere it will be a chat functionfunc_idwhat function are we calling (editNote)params.noteIdID of a note in this chatparams.textthe new text, 1 to 4096 characterson_completenext node after the edit
optional params
params.customNamename shown as the editor instead of the default bot name. Up to 50 characters, must contain a visible characteron_failurenode for a note that does not exist or invalid paramsdepartmentassigns the chat to a departmentagentassigns the chat to a specific agent (email address or CRM ID as defined in the Texter agents manager)
2. Output
The updated note is stored at %state:node.<node_name>%. Its lastEditor is the bot, with customName when you set one.
Same text
When text is the same as the saved text, nothing changes: the node goes to on_complete with the note as it is. Changing only customName with the same text fails the node, because the editor name can change only together with the text.
3. Examples
Update the note saved earlier
update_ticket_note:
type: func
func_type: chat
func_id: editNote
params:
noteId: "%chat:crmData.ticketNoteId%"
text: "Documents received: %state:node.ask_documents.text%"
customName: "Order bot"
on_complete: thank_customer
on_failure: open_ticket_note
If an agent deleted the note, the flow goes to open_ticket_note and writes a new one.